<template>
<!-- 节目权限 -->
<div>
<center>
<div style="">
  <div style=" position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
   
    outline: 0;" id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title"  id="myModalLabel">新增</h4>
                </div>
                <div class="modal-body">
                   


   <form class="form-horizontal" role="form"> 
  <div class="form-group" >
    <label  class="col-sm-2 control-label">上级单位<sqan style="color:red">*</sqan></label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="pr_name" readonly="readonly"   placeholder="请选择上级单位">
     <span style="color: brown;"></span>
    </div>
  </div>
  
  <div class="form-group">
    <label  class="col-sm-2 control-label">单位<sqan style="color:red">*</sqan></label>
    <div class="col-sm-10">
      <input type="text" class="form-control"   id="company_name" placeholder="请选择单位"  readonly="readonly"/>

     <span style="color: brown;"></span>
    </div>
  </div>

  <div class="form-group" >
    <label  class="col-sm-2 control-label">节目开始<sqan style="color:red">*</sqan></label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="program_strat" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  placeholder="请输入节目开始">
    <input type="hidden" id="user_id" value="">
     <span style="color: brown;"></span>
    </div>
  </div>
  <div class="form-group" >
    <label  class="col-sm-2 control-label">节目结束<sqan style="color:red">*</sqan></label>
    <div class="col-sm-10">
      <input type="text" class="form-control" id="program_end" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')"  placeholder="请输入节目结束">
    <input type="hidden" id="user_id" value="">
     <span style="color: brown;"></span>
    </div>
  </div>

  <div class="form-group" style="display: none;">
    <label  class="col-sm-2 control-label">开始时间<sqan style="color:red">*</sqan></label>
    <div class="col-sm-10">
      <input type="text" class="form-control"  id="starttime"  readonly="readonly"   placeholder="请输入开始时间">

     <span style="color: brown;"></span>
    </div>
  </div>
  <div class="form-group" style="display: none;">
    <label  class="col-sm-2 control-label">结束时间<sqan style="color:red">*</sqan></label>
    <div class="col-sm-10">
      <input type="text" class="form-control " id="endtime" readonly="readonly"  placeholder="请输入结束时间">
   
     <span style="color: brown;"></span>
    </div>
  </div>


   
<div class="form-group" style="display: none;">
    <label  class="col-sm-2 control-label">状态</label>
    <div class="col-sm-10">
    <select title="" id="static" class="form-control"><option value="1">开启</option> <option value="0">关闭</option></select>
    </div>
  </div>
 <div class="form-group"  style="display: none;">
    <label class="col-sm-2 control-label">说明</label>
    <div class="col-sm-10">
   <textarea class="form-control" rows="3"></textarea>
    </div>
  </div>
</form>


              
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                    <button type="button" class="btn btn-primary" id="addtj">保存</button>
                </div>
            </div>
        </div>



        
    </div>
</div>



<div class="col-md-12" style="padding-right:0px;padding-left:0px;">
<div>
   <br/>
  <form class="form-inline" style="text-align:left;">
  <label for="name" style="display: none;" >&nbsp;用户名称:</label>
  <input type="text" class="form-control"  id="usnameval"  style="    display: none;" placeholder="请输入用户名称"  onkeyup="this.value=this.value.replace(/^ +| +$/g,'')">
  
 
   



   <button type="button" style="display:none" class="btn btn-primary">查询</button>
   <button type="button" style="display:" class="btn btn-success" id="addt"  data-toggle="modal" data-target="#myModal" >新增</button>
   <!--<button type="button" class="btn btn-primary"  >开启</button>
 <button type="button" class="btn btn-primary" id="add"  data-toggle="modal" data-target="#myModal">关闭</button>!-->
  <button type="button" class="btn btn-success" id="update" style="display:none"  data-toggle="modal" data-target="#myModal">新增</button>

  
  
  </form>
  <br/>

  </div>
        <div>
 <input type="hidden" id="prid"> <input type="hidden" id="prval">
 <div id="menuContenttow" class="menuContent" style="display:none;z-index:100000; position: absolute;width:468px">
	<!--<ul id="treeDemo" class="ztree" style="margin-top:0; width:195px; height: 300px;"></ul>-->
     <loadingtow></loadingtow>
    
</div>
        </div>

	<div class="panel-body" style="height:100%;padding:0px;">
      <div class="jqGrid_wrapper"> 
                        <table id="table_list_1"></table>
                        <div id="pager_list_1"></div>
                    </div>

</div>
</div>
</center>




</div>
 
  
</template>
<style>
@import '../../../../static/css/ztree/metroStyle.css';

</style>

<style  scoped>
 ul.ztree {
    margin-top: 10px;
    border: 1px solid #617775;
    background: #f0f6e4;
    width: 210px;
    height: 360px;
    overflow-y: scroll;
    overflow-x: auto;
}
.ztree {
    margin: 0;
    padding: 5px;
    color: #333;
}
  ::-webkit-scrollbar {
            width: 6px;
            /*height: 6px;*/
        }
        /*正常情况下滑块的样式*/
      ::-webkit-scrollbar-thumb {
            background-color: rgba(0,0,0,.05);
            border-radius: 10px;
            -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1);
        }
        /*鼠标悬浮在该类指向的控件上时滑块的样式*/
        :hover::-webkit-scrollbar-thumb {
            background-color: rgba(0,0,0,.2);
            border-radius: 10px;
            -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1);
        }
        /*鼠标悬浮在滑块上时滑块的样式*/
       ::-webkit-scrollbar-thumb:hover {
            background-color: rgba(0,0,0,.4);
            -webkit-box-shadow: inset 1px 1px 0 rgba(0,0,0,.1);
        }
        /*正常时候的主干部分*/
        ::-webkit-scrollbar-track {
            border-radius: 10px;
            -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0);
            background-color: white;
        }
        /*鼠标悬浮在滚动条上的主干部分*/
        ::-webkit-scrollbar-track:hover {
            -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.4);
            background-color: rgba(0,0,0,.01);
        }
/* @import '../../../../static/css/home/bootstrap.min.css';*/
 </style>


<script>
import loadingtow from '@/views/tree/companytow.vue'; 

import '../../../../static/js/jqgrid/jquery.jqGrid.min.js';
import '../../../../static/js/jqgrid/grid.locale-cn.js';
import  '../../../../static/js/page/Program/power.js';
import '../../../../static/js/ztree/jquery.ztree.exedit.js';
import '../../../../static/js/ztree/jquery.ztree.exhide.js';
import "../../../../static/js/jquery-ui-jqLoding.js"
import  '../../../../static/js/time/jquery.date_input.pack.js';


//import functionalmodule from '@/views/tree/functionalmodule.vue';

export default { 
    name: 'app', 
    data(){
        return{  
      }
    },
     mounted(){  
    },
    methods:{
  
     
    },
    components: {

  //functionalmodule,

      loadingtow: loadingtow
  }
}
var m=0;
$(function(){


  
  $("#prid").val(sessionStorage.getItem("coid"));
  $("#addt").click(function(){ var text=parent.$(".navbar-brand span").text();
text=text.split("-");
$("#pr_name").val(text[1]);
if(m==0)
 //$('.date_picker').date_input();
m++;
// $("#myModal").parent().show();
var html=$("#starttime").parent().html();

$("#starttime").remove();

$(".form-group").eq(4).find(".col-sm-10").html(html);



var html2=$("#endtime").parent().html();

$("#endtime").remove();
$("#endtime").remove();
$(".form-group").eq(5).find(".col-sm-10").html(html2);




$("#starttime").parent().html(html);

$("#starttime").date_input();
$("#endtime").date_input();



 });
  //endtime


 });
 window.iskz=function(id){
return;
$.ajax({
        url:  domain.testUrl+"/Threeinjection/programManagement/updatePermissionInfo",
        type: "post",
        dataType: "json",
        timeout: 5000,//超时设置
        data: {"id":id,"sessionid":sessionStorage.getItem("sid")},
        success: function(data){
          
          //$("#company_name").val("");
  swal("OMG!", "单位已经在", "error");
        }
});
  

 }
</script>
